package com.cq.health.dao;

import com.cq.health.pojo.OrderSetting;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @Author: 悠久的苍穹
 * @Date: 2020/6/2 13:25
 * @Description: 预约设置Dao
 * @Version: 1.0
 */
public interface OrderSettingDao {
    /**
     * 基于日期查询是否有数据
     * @param date
     * @return
     */
    Long countByOrderDate(Date date);

    /**
     * 新增预约设置
     * @param orderSetting
     */
    void add(OrderSetting orderSetting);

    /**
     * 更新预约设置
     * @param orderSetting
     */
    void update(OrderSetting orderSetting);

    /**
     * 获取月区间数据
     * @param beginDate 开始日期
     * @param endDate 结束日期
     * @return
     */
    //select * from t_ordersetting where orderDate like '%2020-06%'
    //select * from t_ordersetting where orderDate BETWEEN '2020-06-01' AND '2020-06-31'
    List<OrderSetting> getOrderSettingByMonth(@Param("beginDate") String beginDate, @Param("endDate") String endDate);

}
